<html>
<head>
	<meta charset='utf-8' />
	<title>便民信息</title>
	<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" />
	<style>
		@media screen and (max-width:450px){
			#nav_bottom{width:98%;margin:0 auto}
			#content{width:98%;margin:0 auto}
			/*页面宽度900以下时 .abc的宽度为450*/
		}
		@media screen and (min-width:450px){
			#nav_bottom{width:450px;margin:0 auto}
			#content{width:450px;margin:0 auto}
			/*页面宽度900以下时 .abc的宽度为450*/
		}
	</style>
</head>
<body style='padding:0;margin:0;background:#eee'>
	<!--主内容区-->
	<div style='margin-bottom:50px' id='content'>
	
		<!--顶部广告区-->
		<div style='margin-bottom:5px;height:70px;border:1px solid'>
			顶部广告区
		</div>
		
		<!--功能主键区-->
		<div style='text-align:center;margin:20px 0'>
			<button class='service_me_buttonMain' style=''>我发布的信息</button>
			<button class='service_me_buttonMain' style=''>其它</button>
		</div>


		<!--信息加载区-->
		<div id='service_me_content'></div>

	</div>
</body>
</html>
<script src='./Public/Js/jquery.js'></script>
<script src='./Public/Js/md5.js'></script>
<script src='./Service/Js/functions.js'></script>
<script>

//验证登陆cookie
login_v();



$(function(){
	//主键按钮选择
	service_me_setButtonMain();
	$('.service_me_buttonMain').click(function(){
		sessionStorage.service_me_buttonMain = $('.service_me_buttonMain').index(this);
		location.reload(true);
	});



	//加载主键相关内容
	switch(sessionStorage.service_me_buttonMain){
		case '0': //我的发布信息
			var url = 'before.php/Before/Index/service_me_content';
			var temp_url = 'Service/Template/Service_me/service_me_content.html?t='+Math.random();
		break;
		default: //其它
			var url = 'aaa';
			var temp_url = 'aaa';
	}
	$.ajax({
		url:temp_url,
		success:function(res){
			$('#service_me_content').html(res);
		},
		error(){
			$.ajax({
				url:'interface.php',
				data:{
					type:'token',
				},
				success:function(token){
					$.ajax({
						url:url,
						data:{
							token:token
						},
						success:function(res){
							$('#service_me_content').html(res);
						}
					})
				}
			})
		}
	})


	//加载底部导航
	$.ajax({
		url:'./Public/Base/before_base_bottom_nav.html',
		success:function(res){
			$(res).appendTo('body');
		}
	})
});



//设置当前选择的主键按钮样式
function service_me_setButtonMain(){
	if(!sessionStorage.service_me_buttonMain){
		sessionStorage.service_me_buttonMain = 0;
	}
	$('.service_me_buttonMain').eq(sessionStorage.service_me_buttonMain).css('background','#999');
}



</script>

